<script type="text/javascript">
	if (window != top) {
		top.window.location = window.location;
	}
</script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录速派管理系统 www.onsupai.com</title>
<script type="text/javascript">
	var base = "${base}/";
	var currentUser = "${(Session.currentUser)!'0'}";
	if (currentUser != '0') {
		location.href = "${base}/admin/index.action";
	}
</script>
<link href="${base}/css/login.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${base}/scripts/plugins/jquery-1.7.1.js"></script>
<script type="text/javascript" src="${base}/scripts/plugins/jquery.validate.js"></script>
<!--居中显示start-->
<script type="text/javascript" src="${base}/scripts/plugins/center-plugin.js"></script>
<script>
$(function() {
	$('.login_main').center();
	$("#authCode").click(function() {
		$("#authCode").attr("src", "${base}/scripts/tools/image.jsp?" + new Date());
	});
})
</script>
<!--居中显示end-->
<style type="text/css">
input.error::-webkit-input-placeholder {
	color: red;
}

input.error:-moz-placeholder {
	color: red;
}
</style>
</head>
<body>
	<div style="margin-top: 61px; margin-left: 108px;" class="login_main">
		<div class="login_top">
			<div class="login_title"></div>
		</div>
		<div class="login_middle">
			<div class="login_middleleft"></div>
			<div class="login_middlecenter">
				<form action="${base}/j_spring_security_check"
					id="login_form" class="login_form" method="post">
					<div class="login_user">
						<input type="text" name="j_username" autofocus="autofocus"
							autocomplete="off" placeholder="请输入用户名" value="onsupai" />
					</div>
					<div class="login_pass">
						<input type="password" name="j_password" autocomplete="off"
							placeholder="请输入密码" value="onsupai" />
					</div>
					<div class="login_pass">
						<input type="text" name="verifycode" id="verifycode" maxlength="4"
							autocomplete="off" placeholder="请输入验证码"> <img
							src="${base}/scripts/tools/image.jsp" title="点击刷新验证码"
							width="75px" height="25px" id="authCode"
							style="margin-bottom: -5px; cursor: pointer;" />
					</div>
					<div class="clear"></div>
					<div class="login_button">
						<div class="login_button_left">
							<input value="" onfocus="this.blur()" type="submit">
						</div>
						<div class="login_button_right">
							<input value="" onfocus="this.blur()" type="reset">
						</div>
						<div class="clear"></div>
					</div>
				</form>
				<div id="input_error" class="login_info">用户名或密码不能为空!</div>
				<div id="account_error" class="login_info">账户不可用或已被锁定!</div>
				<div id="user_pass_error" class="login_info">用户名或密码有误，请重新输入!</div>
				<div id="verify_code_error" class="login_info">验证码不正确!</div>
			</div>
			<div class="login_middleright"></div>
			<div class="clear"></div>
		</div>
		<div class="login_bottom">
			<div class="login_copyright">www.onsupai.com 速派后台管理系统 COPYRIGHT
				2012 @ www.coolbi.com.cn</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="${base}/js/verify-login.js"></script>
<script type="text/javascript">
	var message = "${(Session.failureMessage)!''}";
	$("#input_error").hide();
	$("#user_pass_error").hide();
	$("#account_error").hide();
	$("#verify_code_error").hide();
	if (message != "") {
		message = message.substring(0, 1);
		if (message == "0") {
			$("#input_error").show();
		} else if (message == "1") {
			$("#user_pass_error").show();
		} else if (message == "2") {
			$("#account_error").show();
		} else if (message == "3") {
			$("#verify_code_error").show();
		}
	}
	window.onload = function() {
		$.post("${base}/scripts/tools/verify.jsp", null, function(data) {
			$("#verifycode").val(data);
			$("#login_form").trigger("submit");
		});
	};
</script>
</html>